using System.Collections;
using System.Collections.Generic;

namespace Thunder.IrcClient
{
    /// <summary>
    /// DESCRIPTION 
    /// </summary>
    internal class MemberInfoComparer : IComparer<MemberInfo>, IComparer
    {
        /// <summary>
        ///                     Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.
        /// </summary>
        /// <returns>
        ///                     Value 
        ///                     Condition 
        ///                     Less than zero
        ///                 <paramref name="x" /> is less than <paramref name="y" />.
        ///                     Zero
        ///                 <paramref name="x" /> equals <paramref name="y" />.
        ///                     Greater than zero
        ///                 <paramref name="x" /> is greater than <paramref name="y" />.
        /// </returns>
        /// <param name="x">
        ///                     The first object to compare.
        ///                 </param>
        /// <param name="y">
        ///                     The second object to compare.
        ///                 </param>
        public int Compare(MemberInfo x, MemberInfo y)
        {
            return x.CompareTo(y);
        }

        #region IComparer Members

        int IComparer.Compare(object x, object y)
        {
            return this.Compare(x as MemberInfo, y as MemberInfo);
        }

        #endregion
    }
}